<?php

namespace BigVideo\Examples;

use BigVideo\Examples\Features\FeaturesInstance;

class PeopleInstance
{
    private $peopleParam;

    public function __construct(PeopleParam $peopleParam)
    {
        $this->peopleParam = $peopleParam;
    }

    public function showPeople()
    {
        /*** @var FeaturesInstance $featuresInstance */
        foreach ($this->peopleParam->getParamArray() as $className => $key){
            $featuresInstanceName = '\BigVideo\Examples\Features\\'.$className;
            $featuresInstance = new $featuresInstanceName;
            echo $featuresInstance->saveKey($key)->output()."\n";
        }
    }
}